<template>
  <!-- 头部导航 -->
  <top-nav></top-nav>

  <!-- 头部分类 粘性布局 -->
  <header-sticky></header-sticky>

  <!-- 头部分类 -->
  <app-header></app-header>

  <!-- 主体区域 在home组件中 -->
  <main>
    <router-view></router-view>
  </main>

  <!-- 底部区域 -->
  <app-footer></app-footer>
</template>

<script>
import { useStore } from 'vuex'
import topNav from '@/components/app-topnav.vue'
import appHeader from '@/components/app-header.vue'
import headerSticky from '@/components/app-header-sticky.vue'
import appFooter from '@/components/app-footer.vue'
export default {
  name: 'myLayout',
  components: {
    topNav,
    appHeader,
    headerSticky,
    appFooter
  },
  setup () {
    // 获取数据
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style>

</style>
